<template>
	<view class="content">
		<view class="head">
			<i class="iconfont iconjiaoyichenggong"></i>
			<view class="head-status-title">交易成功</view>
		</view>
		<!-- <view class="head" v-if="detail.order_status == 0">
			<i class="iconfont icondaifukuan"></i>
			<view class="head-status-title">待付款</view>
		</view> -->
		<view class="title">订单详情</view>
		<view class="detail">
			<view>订&nbsp;&nbsp;单 号:　<text>{{data.order_no}}</text></view>
			<!-- <view>订&nbsp;&nbsp;单 名:　<text>{{detail.title}}</text></view> -->
			<view>学　　科:　<text>{{data.subject}}</text></view>
			<view>下单时间:　<text>{{data.buy_time}}</text></view>
			<!-- <view>授课老师:　<text>{{detail.teacher_name}}</text></view> -->
			<view>订单金额:　<text>¥{{data.price}}</text></view>
			<!-- <view>学情分抵扣:　<text>-￥{{detail.studyScore}}</text></view> -->
			<view>支付金额:　<text>¥{{data.price}}</text></view>
			<view>支付方式:　<text>微信支付</text></view>
		</view>
		<view class="btn-box">
			<view class="btn-common go-question" @click="gotoDetail(data.unid)" v-if="data.package_type==1">前往课包</view>
			<view class="btn-common go-question" @click="gotoDetail(data.unid)" v-if="data.package_type==2">前往学包</view>
			<view class="btn-common go-pay" v-if="data.is_comment==0" @tap="check(data.order_no,data.unid)">去评价</view>
			<view class="btn-common go-pay" v-else  @tap="look(data.order_no)">查看评价</view>
		</view>
	</view>
</template>

<script>
	import util from '@/common/util.js'
	export default {
		data() {
			return {
				data:{}
			}
		},
		onLoad(e) {
			this.data = JSON.parse(decodeURIComponent(e.data));
		},
		methods: {
			/* 跳转查看评价 */
			check(order_no,package_id) {
				uni.redirectTo({
					url: '../tongbu/assess?type=2&unid='+order_no+'&package_id='+package_id
				})
			},
			look(order_no){
				uni.navigateTo({
					url:'../tongbu/myRating?type=2&tid='+order_no
				})
			},
			gotoDetail:function(package_id){
				uni.navigateTo({
					url: 'packagelist'
				})
			}
			
		}
	}
</script>

<style>
	.content {
		position: absolute;
		height: 100%;
		width: 100%;
		overflow: hidden;
	}
	/**
	 * 头部样式
	 */
	.head {
		display: flex;
		justify-content: center;
		align-items: center;
		height: 120upx;
		background-color: #FF9900;
		color: #ffffff;
		font-size: 38upx;
	}
	.head i{
		font-size: 50upx;
	}
	.head-status-title {
		margin-left: 16upx;
		font-size: 38upx;
	}
	/**
	 * 头部样式结束
	 */
	.title {
		display: flex;
		align-items: center;
		margin-left: auto;
		margin-right: auto;
		width: 690upx;
		height: 94upx;
		font-size: 36upx;
		color: #333333;
		border-bottom: 1px solid rgba(229,229,229,1);
	}
	
	.detail {
		margin-left: auto;
		margin-right: auto;
		width: 690upx;
		border-bottom: 1px solid rgba(229,229,229,0.6);
		padding: 15upx 0upx;
	}
	.detail view {
		display: flex;
		min-height: 70upx;
		color: #333333;
		font-size: 34upx;
	}
	.detail view text{
		width: 70%;
		margin-left: 20upx;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.detail view view{
		position: absolute;
		right: 30upx;
		color: #FF9900;
	}
	.item-name {
		display: flex;
		justify-content: space-between;
		align-items: center;
		width: 150upx;
		font-size: 34upx;
		color: #333333;
	}
	.item-cont {
		display: flex;
		align-items: center;
		margin-left: 13upx;
		font-size: 34upx;
		color: #333333;
	}
	.add-browse {
		margin-top: 8upx;
		margin-left: 13upx;
		font-size: 34upx;
		color: #333333;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		width: 437upx;
	}
	.browse {
		display: flex;
		align-items: center;
		font-size: 34upx;
		color: #FF9900;
		margin-left: 24upx;
	}
	
	.btn-box {
		display: flex;
		justify-content: flex-end;
		margin: 22upx auto;
		width: 690upx;
	}
	.btn {
		display: flex;
	}
	.btn-common {
		display: flex;
		justify-content: center;
		align-content: center;
		width: 160upx;
		height: 60upx;
		border-radius: 8upx;
		font-size: 34upx;
		margin-left: 15upx;
		color: #00D5A2;
		border: 1px solid #00D5A2;
	}
	.go-question {
		color: #FF9900;
		border: 1px solid #FF9900;
	}
	.explain{
		color: #CCCCCC;
		font-size: 34upx;
		position: absolute;
		bottom: 120upx;
		margin: 0 30upx;
	}
	/**
	 * 详情结束
	 */
</style>
